import request from '@/utils/request'


export function all(){
  return request({
    url:'/admin/spec/all',
    method:'get'
  })
}

export function page(params) {
  return request({
    url: '/admin/spec/index',
    method: 'get',
    params
  })
}

export function create(data){
  return request({
    url:"/admin/spec/create",
    method:'post',
    data
  })
}

export function update(data){
  return request({
    url:'/admin/spec/update',
    method:'post',
    data
  })
}

export function remove(id){
  return request({
    url:'/admin/spec/remove',
    method:'get',
    params:{id}
  })
}

export function allval(id){
  return request({
    url:'/admin/spec/value',
    method:'get',    
    params:{id}
  })
}

export function createVal(data){
  return request({
    url:'/admin/spec/createVal',
    method:'post',
    data
  })
}


export function updateVal(data){
   return request({
     url:'/admin/spec/updateVal',
     method:'post',
     data
   })
}

export function removeVal(id){
  return request({
    url:'/admin/spec/removeVal',
    method:'get',
    params:{id}
  })
}